<include file="public@header" />

	<!--<style scoped="scoped">
		table td{
			padding: 0px;
			width: 20.08mm;
			/* font-size: 4mm; */
			text-align: center;
		}
		table tr{
			overflow: hidden;
		}
		.table-div{
			display: inline-block;vertical-align: top;text-align: right;font-size: 4mm;
		}
	table tr{
		height: 34pt;
		text-align: center;
		font-size: 16px;
	}
	</style>-->

<style id="style1">
	table{border-collapse: collapse;table-layout:fixed;}
	table tr{
		height: 28pt;
	}

</style>

<script type="text/javascript" src="__STATIC__/js/lodop/LodopFuncs.js?v={:time()}"></script>
	<body>
	<div id="wb">
		<table width="99%"   bordercolor="#000000" border="1">
			<tr>
				<td colspan="12" style="text-align: center;font-size: 6mm;">
					济南恭德陵园维保服务单
				</td>
			</tr>
			<tr>
				<td colspan="9" style="text-align: left;">
					<div class="table-div" style="width: 27mm;">{$year}年</div>
					<div class="table-div" style="width: 27mm;">{$month}月</div>
					<div class="table-div" style="width: 27mm;">{$day}日</div>
				</td>
				<td colspan="3">
					<div style="padding-right: 2mm;">
						<div class="table-div" style="float: right;color: red;">1301330</div>
						<div class="table-div" style="float: right;">NO:</div>
					</div>
					
				</td>
			</tr>
			<tr>
				<td rowspan="3">
					持证人
				</td>
				<td colspan="2" rowspan="3">{$result['buyer_name']}</td>
				<td rowspan="3">
					墓位
				</td>
				<td rowspan="2">
					名称
				</td>
				<td rowspan="2" colspan="3">{$result.tomb_region}{$result.tomb_address}</td>
				<td rowspan="3">安葬人</td>
				<td colspan="3">{$burid[0]}</td>
			</tr>
			<tr>
				<td colspan="3">{$burid[1]}</td>
			</tr>
			<tr>
				<td>编号</td>
				<td colspan="3">{$result.tomb_num}</td>
				<td colspan="3">{$burid[2]}</td>
			</tr>
			<tr>
				<td>序号</td>
				<td colspan="2">维修项目</td>
				<td>数量</td>
				<td>单位</td>
				<td>处理方式</td>
				<td>加急</td>
				<td colspan="2">交付时间</td>
				<td colspan="3">备注</td>
			</tr>
			<foreach name="list" key="key" item="vo">
				<tr>
					<td>{$key+1}</td>
					<td colspan="2">{$vo['part_name']}</td>
					<td>{$vo['duration']}</td>
					<td>{$vo['unit']}</td>
					<td>{$vo['warranty_type']}</td>
					<td>{$vo['if_jiaji']}</td>
					<td colspan="2">{$vo['deliver_time']}</td>
					<td colspan="3">{$vo['remark']}</td>
				</tr>
			</foreach>
			<tr>
				<td rowspan="2">交单时间</td>
				<td rowspan="2"colspan="3">{$weibao['deliver_time']}</td>
				<td rowspan="2"colspan="2">接单人</td>
				<td rowspan="2"colspan="2">{$weibao['handle_name']}</td>
				<td colspan="3">墓穴</td>
				<td >墓穴状态</td>
			</tr>
			<tr>
				<!--{$result.tomb_regulation_name}-->
				<td></td>
				<td>{$result.tomb_regulation_name}</td>
				<td></td>
				<td>{$result.col_status_name}</td>
			</tr>
			<tr>
				<td></td>
				<td colspan="11"></td>
			</tr>
			<tr>
				<td colspan="2">维保组负责人签字：</td>
				<td colspan="2"></td>
				<td colspan="2">接单人签字：</td>
				<td colspan="2"></td>
				<td colspan="2">经办人：</td>
				<td colspan="2"></td>
			</tr>
		</table>
	</div>
		<div class="form-actions" id="button_form" style="width: 241mm;">
			<div class="btn btn-primary  " onclick="PreviewMytable()">打印结算单-预览</div>
			<div class="btn btn-primary " onclick="prn1_preview() ">打印结算单</div>
		</div>


	</body>
</html>
<script type="text/javascript">
	function prn1_preview() {

		LODOP.PRINT_INITA("0mm","0mm","244.74mm","116.42mm","维保服务单");
		// LODOP.SET_PRINT_PAGESIZE(0,0,0,"24.13*13.97-打印单据");

		var strStyle="<style>"+document.getElementById("style1").innerHTML+"</style>";
		// var strStyle = document.getElementById("style1").innerHTML;
		// LODOP.ADD_PRINT_TABLE("-4.5pt","7.5pt","95.892%","567pt",strStyle+document.getElementById("div5").innerHTML);
		// LODOP.ADD_PRINT_TABLE("211.5pt","7.5pt","95.892%","342.75pt",strStyle+document.getElementById("div2").innerHTML);

		LODOP.ADD_PRINT_HTM("0.98pt","3.98pt","99.903%","312pt",strStyle+document.getElementById("wb").innerHTML);
		LODOP.SET_PRINT_STYLEA(0,"ItemType",1);
		LODOP.SET_PRINT_STYLEA(0,"LinkedItem",1);
		LODOP.SET_PRINT_STYLEA(0,"ItemType",1);
		LODOP.SET_PRINT_STYLEA(0,"LinkedItem",1);


		// LODOP.PREVIEW();
		// LODOP.PRINT_SETUP();//打印维护
		LODOP.PRINT_DESIGN();//打印设计
	}

	function PreviewMytable(){
		var LODOP=getLodop();
		LODOP.PRINT_INITA("0mm","0mm","244.74mm","116.42mm","维保服务单");
		// LODOP.SET_PRINT_PAGESIZE(0,0,0,"24.13*13.97-打印单据");

		var strStyle="<style>"+document.getElementById("style1").innerHTML+"</style>";
		// var strStyle = document.getElementById("style1").innerHTML;
		// LODOP.ADD_PRINT_TABLE("-4.5pt","7.5pt","95.892%","567pt",strStyle+document.getElementById("div5").innerHTML);
		// LODOP.ADD_PRINT_TABLE("211.5pt","7.5pt","95.892%","342.75pt",strStyle+document.getElementById("div2").innerHTML);

		LODOP.ADD_PRINT_HTM("1pt","1pt","99.9%","312pt",strStyle+document.getElementById("wb").innerHTML);
		LODOP.SET_PRINT_STYLEA(0,"ItemType",1);
		LODOP.SET_PRINT_STYLEA(0,"LinkedItem",1);
		// LODOP.ADD_PRINT_HTM("554.25pt","7.5pt","95.892%","211.5pt",document.getElementById("div3").innerHTML);
		LODOP.SET_PRINT_STYLEA(0,"ItemType",1);
		LODOP.SET_PRINT_STYLEA(0,"LinkedItem",1);


		// LODOP.SET_PRINT_STYLEA(0,"Horient",1);
		// LODOP.ADD_PRINT_TEXT(3,34,196,20,"总页眉：《两个发货单的演示》");
		// LODOP.SET_PRINT_STYLEA(0,"ItemType",1);
		// LODOP.PREVIEW();
		// LODOP.PRINT_SETUP();//打印维护
		LODOP.PRINT_DESIGN();//打印设计
	};
	//打印
	$('.print').click(function () {
		document.getElementById("button_form").style.display="none";
		var printData =window.document.body.innerHTML; //获得 div 里的所有 html 数据
		document.body.innerHTML =  printData ;
		window.print();
		//打印结束后，放开隐藏内容
		document.getElementById("button_form").style.display="block";
		window.close();

	})
</script>